/*
 * @Description: 用户相关接口
 * @Author: ZY
 * @Date: 2020-12-28 14:40:50
 * @LastEditors: scy😊
 * @LastEditTime: 2021-01-20 10:17:09
 */
import https from '@/utils/https'
import { RequestParams } from 'axios-mapper'

export const loginRequest = (userInfo: RequestParams) => {
  return https({
    url: 'auth/login',
    method: 'post',
    data: userInfo
  })
}

export const userInfoRequest = () => {
  return https({
    url: 'system/user/getInfo',
    method: 'get'
  })
}

export const getUsers = (user: any) => {
  return https({
    url: 'user/getUsers',
    method: 'get',
    data: user
  })
}
export const getRoutersRequest = () => {
  return https({
    url: 'system/menu/getRouters',
    method: 'get'
  })
}

export const getCodeRequest: any = () => {
  return https({
    url: 'code',
    method: 'get'
  })
}
